//
//  IndexHeaderTableViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/7/11.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "IndexHeaderTableViewCell.h"

@implementation IndexHeaderTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
    }
    return self;
}

-(void)creatUI{
    
    [self.contentView addSubview:self.img];
    [self.contentView addSubview:self.nameLabel];
}

-(UIImageView *)img
{
    if (_img == nil) {
        _img = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH/2 - 17, 54, 34, 34)];
        _img.contentMode = UIViewContentModeScaleAspectFill;
        _img.clipsToBounds = YES;
        _img.image  = [UIImage imageNamed:@"logo-white"];
    }
    return _img;
}

-(UILabel *)nameLabel
{
    if (_nameLabel == nil) {
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 108, WIDTH, 20)];
        _nameLabel.font = font(18);
        _nameLabel.textColor = SFMColor(255, 255, 255);
        _nameLabel.textAlignment = NSTextAlignmentCenter;
        _nameLabel.text = @"广百展贸股份有限公司";
    }
    return _nameLabel;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
